﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entities;
using Libraries;

namespace DataAccess
{
    public class DataProduct
    {
        DataHelper<Product> _helper;
        
        public DataProduct()
        {
            _helper = new DataHelper<Product>();
           
        }
        public List<Product> GetAll()
        {
            return _helper.FindAll();
        }
        public Product GetObjectByID(int questionAnswerID)
        {
            return _helper.GetObjectByID(questionAnswerID);
        }
        public void AddObject(Product questionAnswer)
        {
            _helper.AddObject(questionAnswer);
            _helper.Commit();
        }
        public void UpdateObject(Product questionAnswer)
        {
            _helper.UpdateObject(questionAnswer);
            _helper.Commit();
        }
        public void DeleteObject(int questionAnswerID)
        {
            _helper.DeleteObject(questionAnswerID);
            _helper.Commit();
        }

        public void DeleteObject(List<int> questionAnswerID)
        {
            _helper.DeleteObject(questionAnswerID);
            _helper.Commit();
        }   
    }
}
